package com.zhike.util;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
/**
 * DynamicDataSource的类，继承AbstractRoutingDataSource并重写determineCurrentLookupKey方法
 */
public class DynamicDataSource extends AbstractRoutingDataSource {

	@Override
	protected Object determineCurrentLookupKey() {
		 return DataSourceHolder.getDataSources();
	}

}
